<?php

namespace JLPay\Models\Openmerch\Bill;

use JLPay\Models\BaseResponse;

/**
 * 账单下载查询响应
 */
class BillDownloadQueryResponse extends BaseResponse
{
    protected ?string $fileUrl = null;

    /**
     * 构造函数
     *
     * @param array|null $responseArray
     */
    public function __construct(?array $responseArray = null)
    {
        parent::__construct($responseArray);
        
        if ($responseArray) {
            $this->fileUrl = $responseArray['file_url'] ?? null;
        }
    }

    /**
     * 获取文件URL
     *
     * @return string|null
     */
    public function getFileUrl(): ?string
    {
        return $this->fileUrl;
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        $data = parent::toArray();
        $data['file_url'] = $this->fileUrl;
        return $data;
    }
} 